<body>
<div class="path fn-clear"><span class="fb">首页</span><a href="{url('channel/index')}">栏目管理</a>{$path}</div>
<div class="ui-form">
<form id="form" action="{url('channel/add')}">
<input type="hidden" name="pid" value="{$pid}"/>
<table>
{if $pid == 0}
    <tr><th>所属站点:</th><td>
      <select class="select" name="language">
        <option value="0" checked="checked">默认站点</option>
      {loop $language $rs}
        <option value="{$rs['id']}">{$rs['name']}</option>
      {/loop}
      </select> <span class="gray">不选进入默认站点,且子类继承根类。</span>
    </td>
{/if}
    <tr><th>栏目类型:</th><td>
            <select class="select" name="type">
              <option value="0">资源列表--[添加内容]</option>
              <option value="1">网站频道--[禁止内容]</option>
              <option value="2">栏目跳转--[直接跳转]</option>
            </select>
        <span class="gray">跳转类型禁止添加内容和子分类</span></td></tr>
    <tr><th>绑定资源模型:</th><td>
            {if $pid == 0}
            <select name="mid" class="select" datatype="*" nullmsg="必须选择绑定模型">
              <option value="">-- 选择绑定模型 --</option>
              {loop $list $rs}
              <option value="{$rs['id']}">{$rs['name']}</option>
              {/loop}
            </select>
            <span class="gray">绑定后禁止修改,且子类继承根类。</span>
            {else}
        <input type="text" name="mid" value="{$list['mid']}" class="input gray-input" style="width:30px" readonly ="readonly"/> <span class="gray">禁止修改,因继承根类模型。</span>
    {/if}
        </td></tr>
    <tr><th>绑定附加模型:</th><td>
            <select name="plus_mid" class="select">
              <option value="">-- 选择绑定模型 --</option>
              {loop $plus $rs}
              <option value="{$rs['id']}">{$rs['name']}</option>
              {/loop}
            </select>
            <span class="gray">绑定后禁止修改,作为资源模型的附加扩展。</span>
        </td></tr>
    <tr><th>栏目扩展模型:</th><td>
            <select name="exts_mid" class="select">
              <option value="0">-- 选择扩展模型 --</option>
              {loop $info $rs}
              <option value="{$rs['id']}">{$rs['name']}</option>
              {/loop}
            </select>
            <span class="gray">绑定后禁止修改,先绑定再编辑修改栏目可显示。</span>
        </td></tr>
    <tr>
    <tr><th>栏目名称:</th><td><input class="input" datatype="*" type="text" name="name" /</td></tr>
    <tr><th>栏目URL:</th><td><input class="input w300" type="text" name="url" /><span class="gray">栏目跳转网址。</span></td></tr>
    <tr><th>前台是否显示:</th><td>显示: <input checked="checked" class="radio" type="radio" name="locks" value="1"> 不显示: <input class="radio" type="radio" name="locks" value="0"></td>
    </tr>
    <tr><th>频道模板:</th><td><input class="input" name="tpl_channel" id="tpl_channel" type="text" /><input url="{url('themes/selecttpl',array(id=>'tpl_channel'))}" title="频道模板选择" value="模板选择" type="button" class="button win" /> <span class="gray">网站频道页面模版</span></td>
    </tr>
    <tr><th>栏目模板:</th><td><input class="input" name="tpl_list" id="tpl_list" type="text" /><input url="{url('themes/selecttpl',array(id=>'tpl_list'))}" title="栏目模板选择" value="模板选择" type="button" class="button win" /> <span class="gray">内容的最终列表页面</span></td></tr>
    <tr><th>内容模板:</th><td><input class="input" name="tpl_content" id="tpl_content" type="text" /><input url="{url('themes/selecttpl',array(id=>'tpl_content'))}" title="内容模板选择" value="模板选择" type="button" class="button win" /></td></tr>
    <tr><th>附加模型模板:</th><td><input class="input" name="tpl_plus" id="tpl_plus" type="text" /><input url="{url('themes/selecttpl',array(id=>'tpl_plus'))}" title="附加模型模板选择" value="模板选择" type="button" class="button win" /> <span class="gray">如“绑定附加模型”则选择</span></td></tr>
</table>
<div class="btn fn-tac">
    <input type="submit" value="确定保存" class="button button-blue" />
    <input type="reset" value="重置" class="button button-yellow" />
</div>
</form>
</div>
<script type="text/javascript">
Do('base','Dialog','Form',function(){ 
    $('#form').cpFormPage();
    $(".win").click(function(){
        $(this).cpWindows();
    });
})      
</script>
</body>
